﻿@model BankCreditPortfolio.Models.AccountModels.ChangePasswordModel

@{
    ViewBag.Title = "Change Password";
}

<strong>Change Password</strong>
<p>
    Use the form below to change your password. 
</p>

<link href="@Url.Content("~/Content/Styles/forms.css")" rel="stylesheet" type="text/css" />

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Password change was unsuccessful. Please correct the errors and try again.")
    <div>
        <fieldset>
            <legend>Account Information</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.OldPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.OldPassword)
                @Html.ValidationMessageFor(m => m.OldPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.NewPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.NewPassword)
                @Html.ValidationMessageFor(m => m.NewPassword)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>
            <p>Fields marked <b>bold</b> are required</p>
            <p>
                <input type="submit" name="button" value="Change Password" />
                <input type="button" onclick="ClickCancel();" value="Cancel" />
                <script type="text/javascript">
                    function ClickCancel() {
                        window.location = '@Url.Action("Index", "Home")';
                    }
                </script>
            </p>
        </fieldset>
    </div>
}
